use my_proc_micro::{make_answer, my_function_macro, my_macro, print_fields};

// 使用 print_fields 属性宏
#[print_fields]
struct Person {
    name: String,
    age: u32,
    email: String,
}

fn main() {
    make_answer!();
    println!("{}", answer());
    let result = my_function_macro!(42); // 输出: This is a function-like macro with input: 42
    println!("Result: {}", result);
    my_macro! {pub fn greet(name: &str) -> String {
            format!("Hello, {}!", name)
        }}

    let person = Person {
        name: "Alice".to_string(),
        age: 30,
        email: "alice@example.com".to_string(),
    };

    // 调用生成的方法来打印字段
    person.print_fields();
}
